/*#include <stdio.h>
int  main()
{
	int n,t,sum=0;
	scanf("%d",&n);
	
	while(n!=0)
	{
		t=n;
		n=n%10;
		sum=sum+n; 
		n=t/10;
	}
	printf("%d",sum);
	return 0;
} 
#include <stdio.h>
int main()
{
	int t,n,count=0;
	scanf("%d",&n);
	while(n!=1)
	{
		if(n%2==0)
		{
			n=n/2;
		}
		else
		{
			n=n*3+1;
		}
		count++;
	}
	printf("%d",count);
	return 0;
 }
#include <stdio.h>
int main()
{
 	int i,count=0;
 	for(i=1;i<=2019;i++)
 	{
 		int m=i;
 		while(m!=0)
 		{
 			if(m%10==9)
 			{
 				count++;
 				break;
		    }
		    else
		    {
		    	m=m/10;
			}
		}
	}
	printf("%d",count);
	return 0;
} 
#include <stdio.h>
int main()
{
	int n,a,b,c,count=0;
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
	{
		scanf("%d %d %d",&a,&b,&c);
		if((a+b+c)*1.0/3<60)
		count++;
	}
	printf("%d",count);
	return 0;
}*/
#include <stdio.h>
int main()
{
	int m,n,d,t,sum=0,count=0;
	while(scanf("%d %d",&m,&n)!=EOF)
	{
		for(int i=m;i<=n;i++)
		{
			sum=0;
			d=i;
			while(d!=0)
			{	
				t=d;
				d=d%10;
				sum=sum+d*d*d;
				d=t/10;
			}
			if(i==sum)
			{
				count++;
				printf("%d ",sum);
			}
		} 
		if(count==0)
		printf("no");
	}
	return 0;
}
